package com.ss.android.http.legacy.a;

import com.ss.android.http.legacy.c;
import com.ss.android.http.legacy.NameValue;

public final class b implements c, Cloneable {
    private final String a;
    private final String b;
    private final NameValue[] c;

    public b(String arg3, String arg4, NameValue[] arg5) {
        if(arg3 == null) {
            throw new IllegalArgumentException("Name may not be null");
        }

        this.a = arg3;
        this.b = arg4;
        this.c = arg5 != null ? arg5 : new NameValue[0];
    }

    public final String a() {
        return this.a;
    }

    public final String b() {
        return this.b;
    }

    public final NameValue[] c() {
        return (NameValue[]) this.c.clone();
    }

    public final Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public final boolean equals(Object arg8) {
        int v0;
        boolean v1 = false;
        if(arg8 != null) {
            if(this == (((b)arg8))) {
                v1 = true;
            } else if(((arg8 instanceof com.ss.android.http.legacy.c)) && (this.a.equals(((com.ss.android.http.legacy.a.b)arg8).a)) && (android.support.design.a.a((Object) this.b, (Object) ((b)arg8).b))) {
                NameValue[] v3 = this.c;
                NameValue[] v4 = ((b)arg8).c;
                if(v3 != null) {
                    if(v4 != null && v3.length == v4.length) {
                        v0 = 0;
                        while(true) {
                            if(v0 >= v3.length) {
                                v0 = 1;
                                break;
                            }
                            else if(android.support.design.a.a(v3[v0], v4[v0])) {
                                ++v0;
                                continue;
                            }

                            v0 = 0;
                            break;
                        }
                    }else {
                        v0 = 0;
                    }
                } else if(v4 == null) {
                    v0 = 1;
                } else {
                    v0 = 0;
                }

            label_22:
                if(v0 == 0) {
                    return v1;
                }

                v1 = true;
            }
        }

        return v1;
    }

    public final int hashCode() {
        int v1 = android.support.design.a.a(android.support.design.a.a(17, (Object) this.a), (Object) this.b);
        NameValue[] v2 = this.c;
        int v3 = v2.length;
        int v0;
        for(v0 = 0; v0 < v3; ++v0) {
            v1 = android.support.design.a.a(v1, v2[v0]);
        }

        return v1;
    }

    public final String toString() {
        com.bytedance.frameworks.baselib.network.http.util.b v1 = new com.bytedance.frameworks.baselib.network.http.util.b(64);
        v1.a(this.a);
        if(this.b != null) {
            v1.a("=");
            v1.a(this.b);
        }

        NameValue[] v2 = this.c;
        int v3 = v2.length;
        int v0;
        for(v0 = 0; v0 < v3; ++v0) {
            NameValue v4 = v2[v0];
            v1.a("; ");
            v1.a(String.valueOf(v4));
        }

        return v1.toString();
    }
}

